package com.bdqn.oa.dao;

import com.bdqn.oa.entity.Department;

import java.sql.SQLException;
import java.util.List;

public interface DepartmentDao {
    /**
     * 返回部门信息集合
     * @return
     */
    public List<Department> listgetAllDepartmentInfo()throws SQLException;

    /**
     * 修改部门名字（Department里传 id, name）
     * @param department
     * @return
     */
    public int updateDepartmentName(Department department)throws SQLException;

    /**
     * 修改部门领导的id（Department里传 id,Employeeid）
     * @param department
     * @return
     */
    public int updateDepartmentEmployeeid(Department department)throws SQLException;

    /**
     * 增加部门(可以同时定下领导ID)（Department里传 name,employid可以传可以不传）
     * @param department
     * @return
     */
    public int insertDepartment(Department department)throws SQLException;



    /**
     * 通过部门id删除部门
     * @param id
     * @return
     */
    public int deleteDepartment(Integer id)throws SQLException;

}
